import Vue from 'vue'
import VueRouter from 'vue-router'
import My from '../components/my.vue'
import search from '../components/search.vue'
import Login from '../components/login.vue'
import Shopping from '../components/shopping.vue'
import Home from '../components/home.vue'
import Class from '../components/Class/Class.vue'
import commit from '../components/common/commit.vue'
import address_edit from '../components/common/address_edit.vue'
import GoodList from '../components/Class/GoodList.vue'
import ShowGoods from '../components/Class/ShowGoods.vue'


Vue.use(VueRouter)
const routes = [
  { path: '/', redirect: '/login' },
  { path: '/login', component: Login, },
  { path: '/home', component: Home },
  { path: '/class', component: Class },
  { path: '/search', component: search },
  { path: '/shopping', component: Shopping },
  { path: '/my', component: My },
  { path: '/commit', component: commit },
  { path: '/address_edit', component: address_edit },
  { path: '/goodslist', component: GoodList },
  { path: '/showgoods', component: ShowGoods }
]

const router = new VueRouter({
  routes
})

export default router
